# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=gnome-screenshot
pkgver=41.0+r25+g45f08f0
pkgrel=1
pkgdesc="Take pictures of your screen"
url="https://gitlab.gnome.org/GNOME/gnome-screenshot"
arch=(x86_64)
license=(GPL2)
depends=(gtk3 libhandy)
makedepends=(git meson appstream-glib)
options=(debug)
_commit=45f08f0b91a7b2aa589c9b3add671e144207e37a  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-screenshot.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 et:
